package com.itheima.chapter03.mapper;

import com.itheima.chapter03.domain.Article;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface ArticleMapper {
    /**
     * 根据id查找指定Article
     *
     * @param id
     * @return
     */
    Article selectArticle(Integer id);

    /**
     * 根据参数查找Article列表
     *
     * @param article
     * @return
     */
    List<Article> listArticle(Article article);

    /**
     * 插入Article
     *
     * @param article
     * @return
     */
    int insertArticle(Article article);

    /**
     * 修改Article
     *
     * @param article
     * @return
     */
    int updateArticle(Article article);

    /**
     * 删除指定的Article
     *
     * @param id
     * @return
     */
    int deleteArticle(Integer id);
}
